﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using TestModel.SysManage;

namespace TestDBData.Mapping.SysManage
{
    /// <summary>
    /// 表示类别映射配置
    /// </summary>
    public partial class sys_UserMap : NopEntityTypeConfiguration<sys_User>
    {
        public override void Configure(EntityTypeBuilder<sys_User> builder)
        {
            builder.ToTable(nameof(sys_User));
            builder.HasKey(sysUser => sysUser.gid);

            builder.Property(sysUser => sysUser.userLoginName).HasMaxLength(30).IsRequired();
            builder.Property(sysUser => sysUser.userPwd).HasMaxLength(30).IsRequired();
            builder.Property(sysUser => sysUser.userEmail).HasMaxLength(50);

            builder.Ignore(sysUser => sysUser.verifyCode);
            builder.Ignore(sysUser => sysUser.oldPwd);

            base.Configure(builder);
        }
    }
}
